home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GFX Sensations 1
/
Graphic Sensations - Volume 1.iso
/
tools
/
amiga
/
gfx_card
/
opcd40.lha
/
opalpcd.doc
< prev
Wrap
Text File
|
1993-05-16
|
19KB
|
306 lines
OPALPCD.DOC
WHAT DOES THIS DO BESIDES TAKE UP DISK SPACE:
This program takes an image file from a Photo CD ® disc and either displays
it on an Amiga ® computer. It will display on an OpalVision ® screen and
can be saved as an IFF24 file on the command line. PhotoCD is a format where
negatives and slides are scanned at resolutions up to 3072x2048 and storing
up to 100 of these on a compact disc. It costs between US $0.90 to $1.80 per
image to transfer existing images with a ten image minimum, and gives the user
access to scans done with a $35 000 scanner. It costs around US$ 12 for
developing 24 exp roll and transferring it directly to cd only. As of the .30
resolution other companies are offering this service such as Best and Dale Labs,
and this has brought prices down. I hope to see low cost photofinishers such as
Clark and York coming out with this service soon which should really bring down
costs.
This code is derived from hpcdtoppm, a source file for a ppm file converter
written by Hadmut Danisch for. That source only file has been modified and
debugged to work with IFF24 and OpalVision. Since its first release, many
features have been added.
There are two versions. Opalpcd requires a 68020 and 68881 and up accel-
erator or an A3000 or an A4000 and is optimized for these and will crash
if run on a vanilla 500, etc. For those less fortunate there is a version,
opalpcd.000 for standard machines. This uses the IEEE library in Workbench
1.3 and up. For the 3000, 4000 and accelerated 2000, use the Opalpcd which
is optimized for the 030/881 and is twice as fast as the .000 version.
Other requirements are opal.library in libs: and an OpalVision
card for viewing. Also, at least 3 meg of FAST RAM are needed, and one meg
of chip RAM for Base resolution. Of course, a CD-ROM drive is required and
CDROM-FS by Canadian Prototype Replicas. Do note that testing has been done
with SINGLE SESSION only, I don't think the existing file systems support
multission at this time. When getting images transferred it is best to pool
several dozen images or several rolls to be transferred at once so all is in
one session. Subsequent sessions may not be accessible.
HOW DOES PHOTO CD WORK:
As mentioned above, its a new way to get your pictures developed, and
images stored, but it is still advisable to hang on to your negatives.
The negative is developed as usual ( C41 process) but is fed into a special
scanner. The resulting files are between 3 and 6 meg. Five resolutions
are stored, all at a 1.5 to 1 aspect ratio(pixelwise). Note that the format
is NOT RGB. It is some luma and two chroma formats, similar to HSV. Also,
in most cases, the chroma has a lower resolution, usually half in each direction.
IE the BASE or -3 resolution has a chroma resolution of 384 by 256. This halves
the image storage space there. Having five resolutions is redundant and would
nearly double the entire size, so what is done is only the smaller three are
redundant and not compressed. These all add up to just under one meg. For
the 1536x1024 and 3072x2048, the base resolution is expanded or interpolated
out to the final size, but there lacks the detail. The remainder of the file
contains compressed data, which is the difference between the interpolated data
and the actual detail. This way avoids redundancy and keeps the file size
reasonable so 100 or more can be stored on a single disc. The penalties are
some chroma detail(usually not noticable) and time to unpack.
For more detailed info, study the source file, opalpcd.c.
WHAT DO I NEED TO USE THIS:
1) An Amiga 2000, 3000, or 4000 computer.
Accelerator STRONGLY recommended if using a 2000.
2) An OpalVision Card (gee there only $699 now!!) to see the images.
and Opal.library installed in your Libs: directory.
3) Memory. Depending on resolution. Always need at least 1Meg chip and:
For Base resolution: 4Meg fast
For 4Base(1536x1024): 12Meg fast no virtual.
6-7 Meg (8recommended) with virtual.
For 16Base: ALOT 8 Meg absolute min in virtual.
(this is tight even softkick can cause problems)
12-16 recommended, 20 Min not virtual.
Note 16Base figures are for cropping a 4Base size image. For full
image it needs 20Meg virtual, 40Meg not virtual. It may be possible
to make two crops(top and bottom) and stich them together. It may
also be possible to use a virtual memory device to get around this
instead of the virtual mode. This has NOT been tested yet!!
4) An XA compatible CD ROM drive. Must be SCSI for Amiga. Those $200
PC compatible specials won't cut it. Recommend a double speed which
has multissession for future expansion.
5) One or more Photo CDs. You can get these made now, developing onto them
for about 60c a pop, transfering existing negs & slides for a little
over a buck a pop. As of this writing only single session discs work,
but THIS IS A FUNCTION OF THE FILE SYSTEM AND DRIVE, NOT OPALPCD.
HOW DO I USE THIS:
To use, type "OpalPcd [options] pcdfile [iff24file]" and return. It
must be run from CLI or shell, but can be tied into a directory utility
or other program. Options are the items starting with a "-" that denote
size and operation. Just typing opalpcd <CR> will list these for you.
There are five sizes from 1 to 5, with 3 being the base at 768 X512. This
is suitable for most Amiga video and general imaging applications.
The next one down (-2) is 368X256 and works well with lo-res noninterlaced
and loads faster(6 vs 25 sec on 68030/882). It is suited for use in higher
speed animations. Due to many data format and floating point manipulations
the conversion is slow. Data is NOT in a straight RGB format, but is in
a Luma Chroma Chroma format, somewhat like HSV I think. Also, the chroma
resolution is about half the luma resolution, and the data must be expanded
out. However this halves the image size.
Larger resolutions are supported. The Base size is first read, then
interpolated or expanded. Next, the differencd from this interpolated data
and the actual high resolution image data is read and decompressed. In the
highest resolution the Luma is expanded and again fed decompressed data in
a 'delta' fasion. The Luma is also read and decompressed and added to an
effective resolution of 1536x1024, and interpolated once more. Whew! enough
theory. If you don't understand this, don't worry.
The option -4 will extract a 1536x1024(4Base) resolution. However, the
Chroma is effectively at 368x256 and interpolated twice. In most cases this
is not noticable. However, in rapidly fluxuating color, a special mode to
obtain full chroma sampling is invoked by using the -6 resolution mode, where
both Luma and Chromas are full resolution. This uses the chroma data meant
for the highest resolution at the end of the file, but at the cost of speed.
The -4 option takes about 2 min and the -6 option about 4 on the 3000. To
obtain a full output image, it will take 12M normally, and 8M with the -v
option selected, and it will use about 5Meg of hard disk. For REALLY high
resolution, use -5 or 3072x2048. Without the -v option, few machines can even
start this operation as it would consume nearly 40Meg for a full output.
With the -V option 8Meg fast could just barely squeak by with an output image
cropped to approx a 4Base size. A full size even with -v will require about
20Meg Fast RAM ( the motherboard can hold 16). These higher resolution modes
are mainly for critical DTP work, and for cropping out moderate to small
portions of an image. Again, take a small size (-2 or -3) into OpalPaint
and get the coordinates and multiply by the difference in size and use these
as your crop points. OpalPCD will never have a glorious user interface.
The pcdfile name must be typed except when using the slideshow mode. Look in
CD0:PHOTO_CD/IMAGES for these. They are large files, 3-6 Meg. Iff24file is the
filename with path for a resulting 24 bit IFF file in the same resolution as
the PCD file, and omitting this will cause display only. Note that JPEG can
be used instead, see below.
Slideshow mode is a new mode with -p for presentation (s is already taken
for sharpening). This workes with base and base/4 resolution. In the latter
pictures will load and change every 20-30 sec and about 7 on the latter on
an accelerated machine. To stop hold the left mouse button, and instead of
changing again it will exit. It will also exit when it goes beyond the last
file. The image files are numbered like frames of an animation, IMG00XX.PCD
where XX is 01 for the first, 30 for the thirtyith, etc. A disk can hold
a hundred or so. Due to this standard the path is fixed at CD0:PHOTO_CD/IMAGES.
If your drive is NOT CD0:, try "assign CD0: CD_DRIVE" where CD_DRIVE is
the name of your CD ROM device. If you have a compiler, change the source and
recompile. Entering the two digit number will start the slideshow at this point
and it will no go back to the first image when done.
To view an image taken with the camera tilted sideways for better vertical
capture, use the -l or -r option to right the image. Note that this cannot be
used with the -v option. Sorry.
Newly added is the -b option to place the image as a backdrop to
Amiga when exiting, kind of like OpalHotKey. Be the first on your block to
have a Photo CD WorkBench screen!
For a quick list of options, type "opalpcd" and NOTHING ELSE and return,
a list will appear on your screen. They are explained in this text and
revision texts below as new ones are added.
/* --------------- New in V .20 10-Mar-93 --------------------- */
Resolution 4 is working now, but is very memory intensive. It requires
8 M Fast to use for cropping and about 12 for full screen output.
Cropping has been added. This is to be done from CLI. Use the -c
option followed by the coordinates in order: x and y of top left corner where
cropping starts(in relation to full image), then the width and the height
of the area to be extracted. If these are left out, the default is a
736 x 480 section from the center. This area will be displayed from the
upper left of the screen and saved if desired. Cropping will only work
with resolutions 3 and 4.
A good way to get coordinates is to convert a size 2 picture and load
it into OpalPaint. Now move the cursor over the top left corner to crop.
write down the coordinates. Multiply these by four and these become the
x and y coordinates. Now move to the lower right of the desired area.
Again, write down the coordinates. Subtract the cursor coordinates
read before from these. Now multiply these differences by four. This will
become the w and h of the extracted data.
Synopsis: -c x y w h
Next, option -j [quality] allows saving in Jpeg format instead of
IFF24. The quality is optional and can be from 1 to 100. The default is 70
and much below 40 or 50 will show degradation.
Finally, a shortcut has been added to display or access the files.
in place of the full filename, use the last two digits. So entering
"44" in the pcd filename is like "CD0:PHOTO_CD/IMAGES/IMG0044.PCD", etc.
I got tired of typing it in all the time. Note two things:
1) for numbers 1 thru 9, a leading zero is required, IE 01 and 09.
2) If the -c or -j option are used and not all possible parameters
are entered, this number will be mistaken for the quality or
coordinate, unless another parameter is inserted between.
/* -------------------- NEW IN VERSION 0.30 19-APR-93 ----------- */
Resolution 6 has been added, this really is the same as 4 (1536x1024)
BUT has a FULL chroma sampling. In Photo CD, the two chroma components
are sampled at a lesser rate, usually every other pixels, in the case of
resolution 4, it was every 4th pixel. The chroma for the other 3/4 of the
pixels is interpolated between these sample points. Usually it is not
noticable except with subject material with many changing bright colors.
The sample rate in mode 6 is the same as for luma. This is accomplished
by taking the chroma data for resolution 5 and add it on. Unfortunatly
the program must wade throught the luma component of 5 to find this since
all three points are together. This mode takes longer, typically four
minutes on a 25MHz 3000. Sometimes the chroma data gets errors at the end,
this is usually within a sector or two of the end of file. Not sure if
it is in CDROM-FS, the drive, or this program needs some more data, or in
the PCDs themselves. If it gets within a few lines it is considered
complete, as the interpolated data on the last few lines won't be noticable.
If an error should occur, try copying to a hard drive and working from there,
else revert to resolution 4.
Resolution 5 is still in the experimental stages, and will only produce
a black and white at this resolution. It will not be implemented until
memory reduction is employed. This will require 10-20MB free hard disk
space to cache some data.
The Overview mode, selected by -O, is operational. Use any 2 digit
number for filename and it will look for CD0:PHOTO_CD/OVERVIEW.PCD. At
this point it will load in sixteen images on a high res interlaced screen.
The pictures are numbered as
shown to the right. To see
pictures above 16, press the 1 2 3 4
RIGHT mouse button. In 5 6 7 8
20-30 seconds the next 16 9 10 11 12
images will show. And so on. 13 14 15 16
The last screen will likely
be missing some images unless you have an even multiple of images. Use
add 16 to each number for the actual number. Beyond this, it reverts back
to 1-16. Hit left mouse button to exit.
/* ---------------- NEW IN VERSION 40 on May 12, 1993 --------- */
Virtual memory (-v) mode has been added. Usable in resolutions 4Base and
16Base (-4 and -5), it will allow some data extraction from mode -5 and
full extraction from -4 with as little as 8Meg fast RAM. To go any lower
would cost too much programming time and speed. 8 Meg is the lower limit of
serious Amiga memory and the upper limit of Zorro II( A2000) memory. To us
this you Must have at least 10 Meg (plus the size of any output image) of
hard drive space available. It will generate three temporary files from the
loaded PCD data and then free the PCD memory, open an Opal screen, and then
load it back at 32 lines at a time. Note that on resolution 5 (which is also
new) it is only possible to obtain part of an image at a time as the full
3Kx2K image is approximately 18Meg. Resolution 5 has finally been implimented
and tested. It is fairly slow, taking from 5-10 minutes to load an image.
This is an important feature, allowing larger images for DTP work, without
massive amounts of RAM. However, the Ultimate Amiga mention in Aug 92
Amiga World magazine would do well without the virtual mode in all resolutions,
but substitute Opalvision for the IV24.
The slideshow as fixed to start at any picture rather than 01.
TO DO: ( It ain't over yet..)
Load directly to OpalPaint if even possible.
OK Centaur, lets release a kit already. I heard Centaur say so on BBS.
Am considering lesser image depth modes. A monochrome mode, an 15
bit mode, and possibly an 8 bit(256 color palette) for conversion to
GIF(maybe that too). This would greatly increase time and lose image
quality but allow a full 3Kx2K screen in 8Meg.
THIS PROGRAM'S MISSION IN LIFE:
This program is a purely experimental venture and is being released as
a service to Amiga users to gain exposure to the PhotoCD format and develop
understanding therof. It may be reproduced and distributed inkeeping with
Hadmut's original condition that no profit be made from this. I think a few
companies may frown upon this as a commercial product too. It is freeware
and may be distributed anywhere and everywhere Amigas and cameras meet.
Spread this around the world. This was NOT developed with any trade secrets
or development tools or code from Kodak. All the info was derived from
hpcdtoppm by Hadmut Danisch, who deserves a round of applause for figuring
this out.
No warranties are expressed or implied whatsover and the user assumes all
responsibility arising out of use thereof, including but not limited to, loss
of data, damage to hardware, infringement of patents or copyrights, or even
the decline of Western Civilization. No money is expected for this program,
and the user may alter this and complete debugging as long as it is not
for commercial gain. It is hoped the Amiga community benefits from this
program. If bugs are found, mention it on major networks, and I'll eventually
find out and try to fix it.
Trademark and product recognition to Commodore Amiga, Centaur Development
(OpalVision), and Eastman Kodak (Photo-CD), and CDROM-FS (Canadian Prototype
Replicas). Lets all give them a big round of applause. It is hoped that this
will increase sales of Opalvisions and PhotoCDs.
It has been tested with a PhotoCD processed by KodaLux, and example
images from a Tempera PhotoCD access program. In over 200 images, all have
successfully loaded. There have been minor bugs with some CD ROM systems
that seems to trash the last sector. This will only be encountered in
resolutions 5 and 6 with full Chroma. The program has been made more robust
to shrug of some of these errors, especially within the last 8 or so lines of
a 2048 line program(this is usually dark green or black anyway). It has
been tested with a highly advanced verson of Workbench 3 (the one you get
with AGA machines).
Need a bunch of 24 bit textures? don't want to pay $200? Fill your SLR
with some decent film(100 speed is best) and take macro photos of moss, lichens,
rocks, wood, and whatever else you can think of. Take it to be processed onto
Photo CD.
Happy electronic photography,
-Bazz